﻿using System.Collections;
using System.Collections.Generic;
using INTEX.DataBase.Tools;
using ReflectionStudio.Core;
using ReflectionStudio.Core.Events;
using System;
using System.Data;
using System.IO;
using WPFExcelReport.Helpers;
namespace WPFExcelReport
{
   
    public partial class ITXEXRPT
    {
        public string SYHPrint(ref bool IsReturn)
        {
            if (app.company != "SYH")
                return filename;
            Helper.GetDate(ref date, ref year, ref month, ref day);
            switch (DocType)
            {

                #region=SYH====

                case "SYHWBLABLE":
                    destfolder = SetFolder(Root, "验布标签");
                    #region====文件命名==============
                    order = date;
                    DestFile = destfolder + "\\验布标签-" + date + DateTime.Today.Hour + DateTime.Today.Minute + DateTime.Today.Second + ".xls";
                    #endregion
                    #region=====空白文档=======
                    Standard = "SYHWBLABLE";
                    exAgent.CreateNewSheet(temp + ".xls", Standard);
                    tempfile = exAgent.FileName;
                    #endregion
                    SYHWBLABLE(dsSource);
                    break;
                case "SYHSHIFTPROD":
                    destfolder = SetFolder(Root, "班次产量");
                    #region====文件命名==============
                    order = date;
                    DestFile = destfolder + "\\班次产量-" + date + DateTime.Today.Hour + DateTime.Today.Minute + DateTime.Today.Second + ".xls";
                    #endregion
                    #region=====空白文档=======
                    Standard = "SYHSHIFTPROD";
                    exAgent.CreateNewSheet(temp + ".xls", Standard);
                    tempfile = exAgent.FileName;
                    #endregion
                    SYHSHIFTPROD(dsSource);
                    break;
                case "SYHWVRPOINT":
                    destfolder = SetFolder(Root, "挡车工扣分");
                    #region====文件命名==============
                    order = date;
                    DestFile = destfolder + "\\挡车工扣分-" + date + DateTime.Today.Hour + DateTime.Today.Minute + DateTime.Today.Second + ".xls";
                    #endregion
                    #region=====空白文档=======
                    Standard = "SYHWVRPOINT";
                    exAgent.CreateNewSheet(temp + ".xls", Standard);
                    tempfile = exAgent.FileName;
                    #endregion
                    SYHWVRPOINT(dsSource);
                    break;
                case "SYHPRODA":
                    destfolder = SetFolder(Root, "织造车间A级率统计");
                    #region====文件命名==============
                    order = date;
                    DestFile = destfolder + "\\织造车间A级率统计-" + date + DateTime.Today.Hour + DateTime.Today.Minute + DateTime.Today.Second + ".xls";
                    #endregion
                    #region=====空白文档=======
                    Standard = "SYHPRODA";
                    exAgent.CreateNewSheet(temp + ".xls", Standard);
                    tempfile = exAgent.FileName;
                    #endregion
                    SYHPRODA(dsSource);
                    break;
                case "SYWVZNPROD":
                    destfolder = SetFolder(Root, "车间产量");
                    #region====文件命名==============
                    order = date;
                    DestFile = destfolder + "\\车间产量-" + date + DateTime.Today.Hour + DateTime.Today.Minute + DateTime.Today.Second + ".xls";
                    #endregion
                    #region=====空白文档=======
                    Standard = "SYWVZNPROD";
                    exAgent.CreateNewSheet(temp + ".xls", Standard);
                    tempfile = exAgent.FileName;
                    #endregion
                    SYWVZNPROD(dsSource);
                    break;
                case "SYYBWB13":
                    destfolder = SetFolder(Root, "验布产量");
                    #region====文件命名==============
                    order = date;
                    DestFile = destfolder + "\\验布产量-" + date + DateTime.Today.Hour + DateTime.Today.Minute + DateTime.Today.Second + ".xls";
                    #endregion
                    #region=====空白文档=======
                    Standard = "SYYBWB13";
                    exAgent.CreateNewSheet(temp + ".xls", Standard);
                    tempfile = exAgent.FileName;
                    #endregion
                    SYYBWB13(dsSource);
                    break;
                case "SYHWVPROD":
                    destfolder = SetFolder(Root, "织造产量");
                    #region====文件命名==============
                    order = date;
                    DestFile = destfolder + "\\织造产量-" + date + DateTime.Today.Hour + DateTime.Today.Minute + DateTime.Today.Second + ".xls";
                    #endregion
                    #region=====空白文档=======
                    Standard = "SYHWVPROD";
                    exAgent.CreateNewSheet(temp + ".xls", Standard);
                    tempfile = exAgent.FileName;
                    #endregion
                    SYHWVPROD(dsSource);
                    break;
                case "SYQIPRA":
                    destfolder = SetFolder(Root, "每日A级率");
                    #region====文件命名==============
                    order = date;
                    DestFile = destfolder + "\\每日A级率-" + date + DateTime.Today.Hour + DateTime.Today.Minute + DateTime.Today.Second + ".xls";
                    #endregion
                    #region=====空白文档=======
                    Standard = "SYQIPRA";
                    exAgent.CreateNewSheet(temp + ".xls", Standard);
                    tempfile = exAgent.FileName;
                    #endregion
                    SYQIPRA(dsSource);
                    break;
                case "SYDWB13":
                    destfolder = SetFolder(Root, "每日产量");
                    #region====文件命名==============
                    order = date;
                    DestFile = destfolder + "\\每日产量-" + date + DateTime.Today.Hour + DateTime.Today.Minute + DateTime.Today.Second + ".xls";
                    #endregion
                    #region=====空白文档=======
                    Standard = "SYDWB13";
                    exAgent.CreateNewSheet(temp + ".xls", Standard);
                    tempfile = exAgent.FileName;
                    #endregion
                    SYDWB13(dsSource);
                    break;
                case "UFSCHK":
                    destfolder = SetFolder(Root, "UFS核对");
                    #region====文件命名==============
                    order = date;
                    DestFile = destfolder + "\\UFS核对-" + date + DateTime.Today.Hour + DateTime.Today.Minute + DateTime.Today.Second + ".xls";
                    #endregion
                    #region=====空白文档=======
                    Standard = "UFSCHK";
                    exAgent.CreateNewSheet(temp + ".xls", Standard);
                    tempfile = exAgent.FileName;
                    #endregion
                    UFSCHK(dsSource);
                    break;
                    #endregion
            }
            return filename;
        }
      

    }
}
